package com.pay.game.central.web.mapper;

import org.apache.ibatis.annotations.Select;

import java.util.Map;

public interface CountMapper {

    @Select("select su.score, sum(ps.used_score) used_score, " +
            "sum(pg.loop_times) limit_times, count(distinct ps.id) store_size, " +
            "sum(pg.done_times) done_times, su.interest_rate " +
            "from sys_user su, pdd_store ps, pdd_goods pg " +
            "where su.id = #{userId} and ps.user_id = su.id and pg.store_id = ps.id " +
            "group by su.id")
    Map userCount(String userId);
}
